package com.common.core.utils;

import com.alibaba.fastjson.JSON;

import java.lang.reflect.Type;

/**
 * Created by lajin on 16/5/16.
 */
public class JsonUtils {

    private JsonUtils() {
    }

    public static <T> T getObject(String objStr, Type type) {
        return JSON.parseObject(objStr, type);
    }

    public static String toJson(Object obj) {
        return  JSON.toJSONString(obj);
    }
}
